package view.mediators
{
	import org.puremvc.as3.interfaces.IMediator;
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.mediator.Mediator;
	
	public class ApplicationMediator extends Mediator implements IMediator
	{
		public static const NAME:String = "Application Mediator";
		
		public function ApplicationMediator(view:stratego)
		{
			super(NAME, view);
		}
		
		override public function listNotificationInterests():Array{
			return [
					BoardFacade.START_BOARD
					];
		}
		
		override public function handleNotification(notification:INotification):void{
			switch(notification.getName()){
				case BoardFacade.START_BOARD:
					application.log.visible = false;
					application.mainPanel.visible = true;
					break;
			}
		}
		
		private function get application():stratego{
			return viewComponent as stratego;
		}
	}
}